package com.grom.service;

import java.util.List;

import com.grom.dao.CustomerDao;
import com.grom.po.BrandVisitHistory;
import com.grom.po.ContactInfo;
import com.grom.po.Customer;

public interface CustomerService {
	CustomerService instance = new CustomerService() {
		public void add(Customer customer,List<ContactInfo> conList,List<BrandVisitHistory> historyList) {
			CustomerDao.instance.save(customer,conList,historyList);
		}

		public List<Customer> getAllCustomer() {
			return CustomerDao.instance.getAllCustomer();
		}

		public Customer getCustomerById(String ID) {
			return CustomerDao.instance.getCustomerById(ID);
		}

		public void update(Customer customer,List<ContactInfo> conList,List<BrandVisitHistory> historyList) {
			CustomerDao.instance.update(customer,conList,historyList);
		}

		public void delete(Customer customer) {
			CustomerDao.instance.delete(customer);
		}

		public List<Customer> selectByCondition(String sql) {
			return CustomerDao.instance.selectByCondition(sql);
			
		}
	};

	void add(Customer customer, List<ContactInfo> conList,List<BrandVisitHistory> historyList);

	List<Customer> getAllCustomer();

	Customer getCustomerById(String ID);

	void update(Customer customer, List<ContactInfo> conList,List<BrandVisitHistory> historyList);
	
	void delete(Customer customer);
	
	List<Customer> selectByCondition(String sql);
}
